package com.example.bili.service.impl;

import com.example.bili.dao.UserDao;
import com.example.bili.entity.User;
import com.example.bili.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;


    @Override
    public User login(String uPhone, String uPwd) {
        return userDao.login(uPhone,uPwd);
    }

    @Override
    public User queryById(String uPhone) {
        return userDao.queryById(uPhone);
    }

    @Override
    public List<User> foover(String uPhone) {
        return userDao.foover(uPhone);
    }

    @Override
    public List<User> fooover(Integer feid) {
        return userDao.fooover(feid);
    }

    @Override
    public boolean upUser(User user) {
        return userDao.upUser(user)>0;
    }

    @Override
    public List<User> getAllUsers(Integer id,String uName) {
        return userDao.getAllUsers(id,uName);
    }

    @Override
    public List<User> getAllFUsers(Integer id) {
        return userDao.getAllFUsers(id);
    }

    @Override
    public boolean deleteAllUsers(Integer id) {
        return userDao.deleteAllUsers(id)>0;
    }

    @Override
    public List<User> fover(String uPhone) {
        return userDao.fover(uPhone);
    }

    @Override
    public List<User> foverr(Integer feid) {
        return userDao.foverr(feid);
    }

    @Override
    public List<User> fovere(String uPhone) {
        return userDao.fovere(uPhone);
    }

    @Override
    public User getUser(Integer id) {
        return userDao.getUser(id);
    }

    @Override
    public boolean upDateUser(Integer id) {
        return userDao.upDateUser(id)>0;
    }

    @Override
    public boolean insertUser(User user) {
        return userDao.insertUser(user)>0;
    }


    @Override
    public List<User> listUser(int id) {
        return userDao.listUser(id);
    }

    @Override
    public Object listUserZi(int id, int start, int pageSize) {
        return userDao.listUserZi(id, 0, 4);
    }

}
